<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>

<div id="toolbar_expertTrain">
<shiro:hasPermission name="expertInfo:adminEdit:edit">
    <button id="btn_add_expertTrain" type="button" style="margin-left: 5px" class="btn btn-default"><span
            class="glyphicon glyphicon-plus-sign"></span>&nbsp;添加&nbsp;
    </button>
    </shiro:hasPermission>
</div>
<table id="table_expertTrain"></table>
<script>
    var $table_expertTrain = $('#table_expertTrain');
    $table_expertTrain.bootstrapTable({
        data:${data},
        striped: true,
        height: 370,
        search: true,
        searchOnEnterKey: false,
        toolbar: "#toolbar_expertTrain",
        toolbarAlign: 'right',
        columns: [
            {
                formatter: function (value, row, index) {
                    return index + 1;
                }
            },
            {

                field: 'startTime',
                title: '开始时间',
                formatter: function (value, row, index) {
                    return $.Helper.dataTimeHelper.int2DateString(value)
                }
            }, {

                field: 'endTime',
                title: '结束时间',
                formatter: function (value, row, index) {
                    return $.Helper.dataTimeHelper.int2DateString(value)
                }
            },
            {
                width: 200,
                field: 'name',
                title: '培训名称'
            },
            {


                field: 'address',
                title: '培训地址'
            }, {
                field: 'signState',
                title: '签到情况',
                formatter: function (value, row, index) {
                    return $.sysPlugin.ifElse(value,$.sysPlugin.enumeration.signState);
                }
            }, {
                field: 'reason',
                title: '请假事由'
            }
<shiro:hasPermission name="expertInfo:adminEdit:edit">
            , {
                width: 120,
                title: '操作',
                events: 'events',
                formatter: function (value, row, index) {
                    return [
                        '<div class="btn-group btn-group-xs" role="group" >'
                        + '<button type="button" class="btn btn-xs btn-default update_expertTrain">' +
                        '<span class="glyphicon glyphicon-edit  "></span> 修改' +
                        '</button>'
                        + '<button type="button" class="btn btn-xs btn-default delete_expertTrain">' +
                        '<span class="glyphicon glyphicon-remove"></span> 删除' +
                        '</button>'
                        + '</div>'
                    ].join('');
                }
            }
    </shiro:hasPermission>
        ]
    });




    $("#btn_add_expertTrain").click(function () {
        $('#modal_ajax').modal({
            backdrop: 'static',
            keyboard: false,
            show: true,
            remote: 'expertInfo/adminEdit/expertTrain/editDlg?expertId=' + $('#commonExpertId').val()
        });
    });
</script>

